home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-24 | 6.5 KB | 173 lines | [TEXT/MPS ] |
- ;
- ; File: MachineExceptions.a
- ;
- ; Contains: Processor Exception Handling Interfaces .
- ;
- ; Version: Technology: System 7.5
- ; Package: Universal Interfaces 2.2 in “MPW” on ETO #20
- ;
- ; Copyright: © 1984-1995 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- ; stack. Include the file and version information (from above)
- ; in the problem description and send to:
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__MACHINEEXCEPTIONS__') = 'UNDEFINED' THEN
- __MACHINEEXCEPTIONS__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
- ; typedef KernelID AreaID
- ; Machine Dependent types for PowerPC:
- MachineInformationPowerPC RECORD 0
- CTR ds UnsignedWide ; offset: $0 (0)
- LR ds UnsignedWide ; offset: $8 (8)
- PC ds UnsignedWide ; offset: $10 (16)
- CR ds.l 1 ; offset: $18 (24)
- XER ds.l 1 ; offset: $1C (28)
- MSR ds.l 1 ; offset: $20 (32)
- sizeof EQU * ; size: $24 (36)
- ENDR
-
- ; typedef struct MachineInformationPowerPC MachineInformationPowerPC
- RegisterInformationPowerPC RECORD 0
- R0 ds UnsignedWide ; offset: $0 (0)
- R1 ds UnsignedWide ; offset: $8 (8)
- R2 ds UnsignedWide ; offset: $10 (16)
- R3 ds UnsignedWide ; offset: $18 (24)
- R4 ds UnsignedWide ; offset: $20 (32)
- R5 ds UnsignedWide ; offset: $28 (40)
- R6 ds UnsignedWide ; offset: $30 (48)
- R7 ds UnsignedWide ; offset: $38 (56)
- R8 ds UnsignedWide ; offset: $40 (64)
- R9 ds UnsignedWide ; offset: $48 (72)
- R10 ds UnsignedWide ; offset: $50 (80)
- R11 ds UnsignedWide ; offset: $58 (88)
- R12 ds UnsignedWide ; offset: $60 (96)
- R13 ds UnsignedWide ; offset: $68 (104)
- R14 ds UnsignedWide ; offset: $70 (112)
- R15 ds UnsignedWide ; offset: $78 (120)
- R16 ds UnsignedWide ; offset: $80 (128)
- R17 ds UnsignedWide ; offset: $88 (136)
- R18 ds UnsignedWide ; offset: $90 (144)
- R19 ds UnsignedWide ; offset: $98 (152)
- R20 ds UnsignedWide ; offset: $A0 (160)
- R21 ds UnsignedWide ; offset: $A8 (168)
- R22 ds UnsignedWide ; offset: $B0 (176)
- R23 ds UnsignedWide ; offset: $B8 (184)
- R24 ds UnsignedWide ; offset: $C0 (192)
- R25 ds UnsignedWide ; offset: $C8 (200)
- R26 ds UnsignedWide ; offset: $D0 (208)
- R27 ds UnsignedWide ; offset: $D8 (216)
- R28 ds UnsignedWide ; offset: $E0 (224)
- R29 ds UnsignedWide ; offset: $E8 (232)
- R30 ds UnsignedWide ; offset: $F0 (240)
- R31 ds UnsignedWide ; offset: $F8 (248)
- sizeof EQU * ; size: $100 (256)
- ENDR
-
- ; typedef struct RegisterInformationPowerPC RegisterInformationPowerPC
- FPUInformationPowerPC RECORD 0
- Registers ds.b 32 * UnsignedWide.sizeof ; offset: $0 (0)
- FPSCR ds.l 1 ; offset: $100 (256)
- Reserved ds.l 1 ; offset: $104 (260)
- sizeof EQU * ; size: $108 (264)
- ENDR
-
- ; typedef struct FPUInformationPowerPC FPUInformationPowerPC
-
- kWriteReference EQU 0
- kReadReference EQU 1
- kFetchReference EQU 2
- writeReference EQU kWriteReference ; Obsolete name
- readReference EQU kReadReference ; Obsolete name
- fetchReference EQU kFetchReference ; Obsolete name
-
- ; typedef unsigned long MemoryReferenceKind
- MemoryExceptionInformation RECORD 0
- theArea ds.l 1 ; offset: $0 (0)
- theAddress ds.l 1 ; offset: $4 (4)
- theError ds.l 1 ; offset: $8 (8)
- theReference ds.l 1 ; offset: $C (12)
- sizeof EQU * ; size: $10 (16)
- ENDR
-
- ; typedef struct MemoryExceptionInformation MemoryExceptionInformation
-
- kUnknownException EQU 0
- kIllegalInstructionException EQU 1
- kTrapException EQU 2
- kAccessException EQU 3
- kUnmappedMemoryException EQU 4
- kExcludedMemoryException EQU 5
- kReadOnlyMemoryException EQU 6
- kUnresolvablePageFaultException EQU 7
- kPrivilegeViolationException EQU 8
- kTraceException EQU 9
- kInstructionBreakpointException EQU 10
- kDataBreakpointException EQU 11
- kIntegerException EQU 12
- kFloatingPointException EQU 13
- kStackOverflowException EQU 14
- kTerminationException EQU 15
- unknownException EQU kUnknownException ; Obsolete name
- illegalInstructionException EQU kIllegalInstructionException ; Obsolete name
- trapException EQU kTrapException ; Obsolete name
- accessException EQU kAccessException ; Obsolete name
- unmappedMemoryException EQU kUnmappedMemoryException ; Obsolete name
- excludedMemoryException EQU kExcludedMemoryException ; Obsolete name
- readOnlyMemoryException EQU kReadOnlyMemoryException ; Obsolete name
- unresolvablePageFaultException EQU kUnresolvablePageFaultException ; Obsolete name
- privilegeViolationException EQU kPrivilegeViolationException ; Obsolete name
- traceException EQU kTraceException ; Obsolete name
- instructionBreakpointException EQU kInstructionBreakpointException ; Obsolete name
- dataBreakpointException EQU kDataBreakpointException ; Obsolete name
- integerException EQU kIntegerException ; Obsolete name
- floatingPointException EQU kFloatingPointException ; Obsolete name
- stackOverflowException EQU kStackOverflowException ; Obsolete name
- terminationException EQU kTerminationException ; Obsolete name
-
- ; typedef unsigned long ExceptionKind
- ExceptionInfo RECORD 0
- memoryInfo ds.l 1 ; offset: $0 (0)
- ORG 4
- sizeof EQU * ; size: $4 (4)
- ENDR
-
- ; typedef union ExceptionInfo ExceptionInfo
- ExceptionInformationPowerPC RECORD 0
- theKind ds.l 1 ; offset: $0 (0)
- machineState ds.l 1 ; offset: $4 (4)
- registerImage ds.l 1 ; offset: $8 (8)
- FPUImage ds.l 1 ; offset: $C (12)
- info ds.l 1 ; offset: $10 (16)
- sizeof EQU * ; size: $14 (20)
- ENDR
-
- ; typedef struct ExceptionInformationPowerPC ExceptionInformationPowerPC
- IF GENERATINGPOWERPC THEN
- ; typedef ExceptionInformationPowerPC ExceptionInformation
- ; typedef MachineInformationPowerPC MachineInformation
- ; typedef RegisterInformationPowerPC RegisterInformation
- ; typedef FPUInformationPowerPC FPUInformation
- ENDIF
- ; Note: An ExceptionHandler is NOT a UniversalProcPtr.
- ; It must be a native function pointer with NO routine descriptor.
- ; Routine for installing per-process exception handlers
- ;
- ; pascal ExceptionHandler InstallExceptionHandler(ExceptionHandler theHandler)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION InstallExceptionHandler
- ENDIF
-
- ENDIF ; __MACHINEEXCEPTIONS__
-